/**
 * @Author: likang xie
 * @Date: 2019-11-06 17:11:52
 * @Usage 用户模块接口列表
 */

import request from "@/utils/request";

let extra = {
  showLoading: false
};

// 登录
export let login = params => request.post("/doc/user/login", params);

// 注册
export let register = params => request.post("/doc/user/register", params);

// 找回密码
export let reset = params => request.post("/doc/user/passwordReset", params);

// 发送手机验证码
export let sendSmsCode = params => request.get("/doc/user/sendCode", params);

// 验证注册手机验证码
export let checkRegisterSmsCode = params =>
  request.get("/doc/user/phoneCodeVertiy", params);

// 验证找回密码手机验证码
export let checkResetSmsCode = params =>
  request.get("/doc/user/vertify", params);

// 手机登录 发送验证码
export let telLoginSendCode = params => request.get("/doc/send_mobile_login_code", params);

// 手机号验证码登录
export let telLogin = params => request.post("/doc/auth_mobile_login", params);

// 退出登录
export let loginOut = params => request.get("/doc/user/loginOut");

// 用户信息
export let userInfo = () => request.post("/doc/my/user_info", "", extra);

// 修改密码
export let updatePassword = params =>
  request.post("/doc/user/updatePassword", params);

// 修改支付密码
export let updatePayCode = params =>
  request.post("/doc/user/updatePayCode", params);

// 微信登录
export let wxLogin = params =>
  request.post("/doc/user/wexin_login", params, {
    headers: {
      "content-type": "application/json"
    }
  });

// 扫码登录pc接口
export let scanLogin = () => request.post("/doc/brush_login");

// 雇主的任务列表
// export let myTask = params =>
// request.post("/doc/my/my_task_lists", params, extra);
export let myTask = params =>
  request.post("/doc/myTasksList", params, extra);

// 我的收藏列表
export let myCollect = params =>
  request.post("/doc/my/collection", params, extra);

// 删除收藏
export let cancelCollect = params =>
  request.post("/doc/my/cancel_collection", params);

// 我的关注列表
export let myFollow = params => request.post("/doc/my/follow", params, extra);

// 清除收藏列表
export let clearCollect = () => request.post("/doc/my/clear_collection_all");

// 清除足迹列表
export let clearBrowseList = () => request.post("/doc/my/clear_view_log");

// 删除关注
export let cancelFollow = params =>
  request.post("/doc/my/cancel_follow", params);

// 我的浏览列表
export let myBrowse = params => request.post("/doc/my/view_log", params, extra);

// 我的钱包
export let wallertInfo = params =>
  request.post("/doc/user/getWallert", params);

// 钱包交易明细
export let walletTradeLog = params =>
  request.post("/doc/user/getTradeLog", params, extra);

// 保证金明细
export let bondLog = params =>
  request.post("/doc/user/getMyBondLog", params, extra);

// 实名认证
export let realnameAuth = params =>
  request.post("/doc/certification", params);

// 实名认证状态
export let realnameAuthStatus = () =>
  request.post("/doc/my/realname_status", "", extra);

// 银行卡绑定
export let bankAuth = params => request.post("/doc/auth/bankAuth", params);

// 支付宝绑定
export let alipayAuth = params => request.post("/doc/auth/alipayAuth", params);

// 支付宝绑定状态
export let alipayAuthStatus = params =>
  request.post("/doc/my/pay_status", params);

// 支付宝列表
export let alipayList = () => request.post("/doc/my/alipayList", '');

// 添加支付宝账号
export let addAlipay = params => request.post("/doc/my/add_auth_alipay", params);

// 输入打款金额绑定
export let bindAlipay = params => request.post("/doc/my/auth_alipay", params);

// 已绑定的支付宝账号列表
export let listAlipay = params =>
  request.get("/doc/auth/alipayList", params);

// vip 套餐详情
export let vipInfo = () => request.get("/doc/vip_info", "");

// 创建vip订单
export let createVipOrder = params =>
  request.post("/doc/my/create_vip_order", params);

// 我是工程师
export let acceptTask = params =>
  request.post("/doc/acceptTasksList", params, extra);

// 工程师任务统计
export let acceptCount = () => request.post("/doc/my/accept_census", "", extra);

/**
 * 消息
 */

// 交易消息
export let tradeMessageList = params =>
  request.post("/doc/my/trade_news", params, extra);

// 系统消息
export let systemMessageList = params =>
  request.post("/doc/my/syatem_news", params, extra);

// 消息首页
export let messageIndex = () => request.post("/doc/my/new_messages", "");

// 消息详情
export let messageDetail = params =>
  request.post("/doc/my/message_detail", params);

// 消息已读上报
export let readMessage = params =>
  request.post("/doc/user/messageStatus", params, extra);

// 个人简介
export let userIntro = () => request.post("/doc/my/info", "");

// 手机认证状态
export let phoneStatus = () => request.post("/doc/my/phone_status", "", extra);

// 邮箱认证状态
export let emailStatus = () => request.post("/doc/my/email_status", "", extra);

// 选中的技能标签
export let skillList = () => request.post("/doc/my/skill", "", extra);

// 新增技能标签
export let saveSkill = params => request.post("/doc/user/skillSave", params);

// 取消标签
export let cancelSkill = params => request.post("/doc/my/cancel_tags", params);

// 修改用户昵称
export let editNickname = params =>
  request.post("/doc/my/edit_nickname", params);

// 修改头像
export let updateAvatar = params =>
  request.post("/doc/user/updateUserInfo", params);

// 修改性别
export let editSex = params => request.post("/doc/my/edit_sex", params);

// 删除工作经验
export let delJob = params => request.post("/doc/my/del_jobs", params);

// 删除项目经验
export let delProject = params => request.post("/doc/my/del_project", params);

// 新增项目经验
export let addProject = params => request.post("/doc/my/add_project", params);

// 新增工作经验
export let addJob = params => request.post("/doc/my/add_jobs", params);

// 编辑项目经验
export let editProject = params => request.post("/doc/my/edit_project", params);

// 编辑工作经验
export let editJob = params => request.post("/doc/my/edit_jobs", params);

// 新增教育经验
export let addEduition = params => request.post("/doc/my/add_eduition", params);


// 新增教育经验
export let delEduition = params => request.post("/doc/my/del_eduition", params);


// 新增培训经历
export let resumeTrainingsSave = params => request.post("/doc/resumeTrainingsSave", params);


// 新增语言能力
export let resumeLanguagesSave = params => request.post("/doc/resumeLanguagesSave", params);
// 新增证书
export let resumeCertificatesSave = params => request.post("/doc/resumeCertificatesSave", params);
// 新增加密锁
export let resumeEncryptSave = params => request.post("/doc/resumeEncryptSave", params);
// 新增图片附件
export let resumeImgsSave = params => request.post("/doc/resumeImgsSave", params);


// 删除
export let delInfo = params => request.post("/doc/del_info", params);
// 评价
export let infoUpdate = params => request.post("/doc/infoUpdate", params);






// 店铺设置
export let createStore = params => request.post("/doc/my/create_vps", params);

// 获取店铺资料
export let myShop = params => request.get("/doc/user/getShop", params);

// 修改店铺资料
export let editShop = params => request.post("/doc/user/postShopInfo", params);

// 邮箱绑定
export let sendEmail = params => request.post("/doc/my/send_email", params);

// 手机号验证
export let telAuth = params => request.post("/doc/my/post_phone_auth", params);

// 企业认证
export let companyAuth = params =>
  request.post("/doc/my/enterprise_auth", params);

// 企业认证状态
export let companyAuthStatus = params =>
  request.post("/doc/my/enterprise_status", params);

// 意见反馈
export let feedback = params => request.post("/doc/user/feedbackInfo", params);

// 全部已读
export let enterprise = () => request.post("/doc/enterprise/external_internal");
// 用户详情
export let userInfoDetail = params => request.get("/service",params);

// 获取服务商投过用户标的列表
export let getServiceTaskList = params => request.post("/getServiceTaskList",params);


